import { ChannelTypes } from "@store/types/channelTypes";
import { Channel } from "channel";

export namespace ChannelActions {
    export interface RequsetChannel {
        type: ChannelTypes.REQUEST_CHANNEL;
    }
    export interface RequsetChannelSuccess {
        type: ChannelTypes.REQUEST_CHANNEL_SUCCESS;
        payload: { channels: Channel[] }
    }
    export interface RequsetChannelError {
        type: ChannelTypes.REQUEST_CHANNEL_ERROR
        error: string | null;
    }
    export type Actions =
        | RequsetChannel
        | RequsetChannelSuccess
        | RequsetChannelError;
}